import sys
sys.path.append('..')
from common.util import preprocess
from common.util import create_contexts_targets
from common.util import convert_to_onehot

text = 'you say goodbye and i say hello.'
corpus, word_to_id, id_to_word = preprocess(text)
target, contexts = create_contexts_targets(corpus, 1)
print('target: ', target)
print('contexts: ', contexts)

target = convert_to_onehot(target, len(word_to_id))
contexts = convert_to_onehot(contexts, len(word_to_id))
print('target: ', target)
print('contexts: ', contexts)